package org.wak.action.actions
{
	import org.wak.action.IInteractable;
	import org.wak.utils.IIterator;
	
	/**
	 * Action interface 
	 * @author mindscout
	 * 
	 */	
	public interface IAction
	{
		/**
		 * The action identificator. 
		 * @return 
		 * 
		 */		
		function GetId():String ;
		
		/**
		 * Get the action localized text for player's interface uses. 
		 * @return 
		 * 
		 */		
		function GetText():String ;
		
		/**
		 * Returns true if the action has all the scene or inventory item needed as parameters
		 * for the action. 
		 * @return 
		 * 
		 */		
		function get isReady():Boolean ;
		
		/**
		 * Add an IInteractable as action parameter. 
		 * @param pItem an scene item.
		 * 
		 */		
		function AddParameter(pItem:IInteractable):void 
		
		/**
		 * Test if the IInteractable is aceptable as action parameter 
		 * @param pItem true if the action accept the pItem as parameter.
		 * 
		 */		
		function TestParameter(pItem:IInteractable):Boolean 
		
		/**
		 * Executes the action. 
		 * @param pIterator iterator of Puzzles Controller.
		 * @return true if the action found a method for the execution.
		 */		
		function Execute(pIterator:IIterator):Boolean
		
		/**
		 * Tests if the action can execute. 
		 * @param pIterator iterator of Puzzles Controller.
		 * @return true if the action found a method for the execution.
		 */		
		function CanExecute(pIterator:IIterator):Boolean
		
		/**
		 * If no method found for the action, you usually gets a generic message
		 * this method returns that message. 
		 * @return No action message for this action.
		 * 
		 */		
		function GetNoActionText():String ;
		
		/**
		 * The first parameter of the action. 
		 * @return IInteractable parameter.
		 * 
		 */		
		function GetParam1():IInteractable ;
		
		/**
		 * The second parameter of the action. 
		 * @return IInteractable parameter.
		 * 
		 */	
		function GetParam2():IInteractable ;
		
		/**
		 * The number of parameters used by the action.
		 * Usually 1 or 2. 
		 * @return int with the num of parameters used.
		 * 
		 */		
		function get paramsNumber():int ;
		
		
	}
}